﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Pear.Core.Entities.LiveCenter
{
    /// <summary>
    /// 设备表
    /// </summary>
    [SugarTable("Device", TableDescription = "设备表")]
    public class DeviceModel
    {
        /// <summary>
        /// Id
        /// </summary>
        [SugarColumn(ColumnName = "Id", IsPrimaryKey = true, ColumnDescription = "Id")]
        public long Id { get; set; }

        /// <summary>
        /// 设备编码
        /// </summary>
        [SugarColumn(ColumnName = "Code", IsNullable = false, ColumnDescription = "设备编码")]
        public string Code { get; set; }

        /// <summary>
        /// 设备备注
        /// </summary>
        [SugarColumn(ColumnName = "Remark", IsNullable = false, ColumnDescription = "设备备注")]
        public string Remark { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [SugarColumn(ColumnName = "CreateTime", ColumnDescription = "设备编码")]
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 修改时间
        /// </summary>
        [SugarColumn(ColumnName = "UpdateTime", IsNullable = true, ColumnDescription = "修改时间")]
        public DateTime UpdateTime { get; set; }

        /// <summary>
        /// 管理视频Id
        /// </summary>
        [SugarColumn(ColumnName = "VideoId", IsNullable = true, ColumnDescription = "关联视频Id")]
        public int VideoId { get; set; }


        /// <summary>
        /// 视频播放地址，有视频播放地址优先返回
        /// </summary>
        [SugarColumn(ColumnName = "VideoUrl", IsNullable = true, Length = 200, ColumnDescription = "视频播放地址")]
        public string VideoUrl { get; set; }

        /// <summary>
        /// 是否启用
        /// </summary>
        [SugarColumn(ColumnName = "Enabled", DefaultValue = "1", ColumnDescription = "是否启用")]
        public bool Enabled { get; set; }
    }
}
